﻿<Application   
  x:Class="SolutionFramework.App"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:app="clr-namespace:SolutionFramework"
  Startup="Application_Startup"
  UnhandledException="Application_UnhandledException">

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/HydraShellClient;component/Resources/Office2000Themes/sroffice2007blue.xaml" />
                <ResourceDictionary Source="Assets/Styles.xaml" />
                <ResourceDictionary>
                    <app:ApplicationResources x:Key="ApplicationResources" />
                    <app:NotOperatorValueConverter x:Key="NotOperatorValueConverter" />

                    <ControlTemplate x:Key="ValidationToolTipTemplate">
                        <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
                            <Grid.RenderTransform>
                                <TranslateTransform x:Name="xform" X="-25"/>
                            </Grid.RenderTransform>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="OpenStates">
                                    <VisualStateGroup.Transitions>
                                        <VisualTransition GeneratedDuration="0"/>
                                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
                                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                                </DoubleAnimationUsingKeyFrames>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root">
                                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualTransition>
                                    </VisualStateGroup.Transitions>
                                    <VisualState x:Name="Closed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Open">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root">
                                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
                            <Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
                            <Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
                            <Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
                            <Border Background="#FFDC000C" CornerRadius="2"/>
                            <Border CornerRadius="2">
                                <TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding (Validation.Errors)[0].ErrorContent}" UseLayoutRounding="false"/>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>


        </ResourceDictionary>


    </Application.Resources>

</Application>